{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="icon" href="/static/images/dragon.jpg" type="image/x-icon">
    <title>{% block title %}全栈笔记{% endblock %}</title>
    <link rel="stylesheet" href="{% static 'css/bootstrap.css' %}">
    <link rel="stylesheet" href="{% static 'css/main.css' %}">
    <link rel="stylesheet" href="{% static 'css/simditor.css' %}">
    <link rel="stylesheet" href="{% static 'css/shCoreDefault.css' %}">
    <link rel="stylesheet" href="{% static 'css/mycomments.css' %}">
    <script language="javascript" type="text/javascript" src="{% static 'js/video.js' %}" ></script>
<link type="text/css" rel="stylesheet" href="{% static 'css/video-js.css' %}"/>

    <script src="{% static 'js/jquery.min.js' %}" type="text/javascript"></script>
    <script src="{% static 'js/jquery.cookie.js' %}" type="text/javascript"></script>
    <script src="{% static 'js/module.js' %}" type="text/javascript"></script>
    <script src="{% static 'js/hotkeys.js' %}" type="text/javascript"></script>
    <script src="{% static 'js/uploader.js' %}" type="text/javascript"></script>
    <script src="{% static 'js/simditor.js' %}" type="text/javascript"></script>
    <script type="text/javascript" src="{% static 'js/shCore.js' %}"></script>
    <script src="{% static 'js/mycomments.js' %}"></script>
    <script src="{% static 'js/main.js' %}" type="text/javascript"></script>
    <script>
        jQuery(function ($) {
            setAuthenticatedUser();
        });
    </script>
</head>
<body style="padding-top:100px">
<div><span><p id="back-to-top"><a href="#top"><span></span></a></p></span></div>
<div class="navbar navbar-default navbar-fixed-top">
    <div class="navbar-header">
        <a href="{% url "index" %}" class="navbar-brand"></a>
    </div>
    <label id="toggle-label" class="visible-xs-inline-block" for="toggle-checkbox">MENU</label>
    <input class="hidden" id="toggle-checkbox" type="checkbox">
    <div class="hidden-xs">
        <ul class="nav navbar-nav">
            {% for index_list in index_lists %}
{#                {% for i in p_tutorial %}#}
                {% ifequal index_list.url_slug p_tutorial.url_slug %}
                    <li><a   style="background-color: #dddddd" href="{% url 'blogFamily' index_list.url_slug %}">{{ index_list }}</a></li>
                   {% else %}
                    <li><a   href="{% url 'blogFamily' index_list.url_slug %}">{{ index_list }}</a></li>
                   {% endifequal %}
{#                {% endfor %}#}
            {% endfor %}
        </ul>
        {% if user.is_authenticated %}
            <form method="post" action="{% url 'account_logout' %}?next={{ request.path }}" class="navbar-form navbar-right">
                {% csrf_token %}
                你好:{{ user|truncatechars:'12' }}
                <button type="submit" class="btn btn-default "><span
                        class="glyphicon glyphicon-log-out"></span> 登出
                </button>
            <input type="hidden" name="next" value="{{ request.get_full_path }}"/>
            </form>
        {% elif not user.is_authenticated %}
            {% load socialaccount %}
            {% get_providers as socialaccount_providers %}
            {% for provider in socialaccount_providers %}
                <form  method="POST" class="navbar-form navbar-right" action="{% provider_login_url provider.id process=process scope=scope auth_params=auth_params %}">
                {% csrf_token %}
{#                  <button type="submit" class="btn btn-default "><span#}
{#                        class="glyphicon glyphicon-log-out"></span> 登录#}
{#                </button>#}
                     <button type="submit"  class="btn btn-default navbar-btn pull-right sign-in-github "
                            style="border:none;outline:none; box-shadow:none;margin:0px">
                        Sign In
                    </button>
                    <input type="hidden" name="next" value="{{ request.get_full_path }}"/>
            </form>
            {% endfor %}
        {% endif %}
    </div>
</div>
<div class="col-sm-12">
    <div class="blog-href navbar-fixed-top fixed-top-2">

        <p> <a href="{% url 'blogFamily' activated_cate.url_slug   %}"  style="color:#000">{{ activated_cate.name }}</a><span class="glyphicon glyphicon-arrow-right" style="padding-left:10px;padding-right:20px;"></span>{{ blog.category.name }}</p>
    </div>
</div>
{% block body_content %}
{% endblock %}
<div class="footer"><p>Since:2018-09-15 </p>
    <p>网络笔记，好好学习，天天向上！</p>
</div>
{% block main_js %}

<script>
        $(function () {
            //当滚动条的位置处于距顶部100像素以下时,跳转链接出现,否则消失
            $(function () {
                $(window).scroll(function () {
                    if ($(window).scrollTop() > 120) {
                        $("#back-to-top").fadeIn(350);
                    }
                    else {
                        $("#back-to-top").fadeOut(350);
                    }
                });
                //当点击跳转链接后,回到页面顶部位置
                $("#back-to-top").click(function () {
                    $('body,html').animate({scrollTop: 0}, 500);
                    return false;
                });
            });
        });

         $(window).scroll(function () {
                if ($(window).scrollTop() > 120) {
                    $("#back-to-top").fadeIn(350);
                }
                else {
                    $("#back-to-top").fadeOut(350);
                }
            });
            //当点击跳转链接后,回到页面顶部位置
            $("#back-to-top").click(function () {
                $('body,html').animate({scrollTop: 0}, 500);
                return false;
            });
    </script>
{% endblock %}
</body>
<html>








